﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DataAccesLayer
{
    //NOTE : This needs one  more thing to be a real thing .  DOmain oBjects Interfaces .Does it whorth the job ? 
    //will the extension be used ? For now is No 
    /// <summary>
    /// this is An Abstract Factory Pattern Implementation .To loose coupling DataAccess Technology and 
    /// Access Realization .
    /// </summary>
    public class EQualDataLayerFactory: DataAccesLayer.Factory . IDataProvidersFactory 
    {

        #region IDataProvidersFactory Members

        public DocumentDataAccesLayer GetDocumentAccesLayer()
        {
            return new  DocumentDataAccesLayer();
        }

        public EmployeeDataAccesLayer GetEmployeeAccesLayer()
        {
            return new EmployeeDataAccesLayer();
        }

        #endregion

        public void UpdateDataBase()
        {
            new eQualDataContext().SubmitChanges();
        }

        public ProjectsDataAccesLayer GetProjectsAccesLayer()
        {
            return new ProjectsDataAccesLayer();
        }

        public ReviewsDataAccesLayer GetReviewsAccesLayer()
        {
            return new ReviewsDataAccesLayer();
        }

        public object GetAuditsAccesLayer()
        {
            throw new NotImplementedException();
        }
    }
}
